var prevKey = -1;
window.onkeyup = function(e) {
	var key = e.keyCode ? e.keyCode : e.which;
	var isRepeatKey = prevKey == key
	console.log(e.keyCode);
	switch(key){
		case 68:
			
			$('div').css('border', isRepeatKey?'0px':'1px');
			$('div').css('border-style', 'solid');
			break;
	}
	prevKey = isRepeatKey?-1:key;
}